import request from '@/router/axios';
import {downloadExcel} from '@/router/axios';
import {formatCondition} from '@/util/util';
//单条查询
export const queryBizSixteenTopicDb = (params) => {
  params.head.transCode = 'queryBizSixteenTopicDb';
  return request({
    url: '/biz/sixteen/bizSixteenTopicDb/queryBizSixteenTopicDb',
    method: 'post',
    data: params
  })
}
//多条列表查询，支持条件查询
export const queryBizSixteenTopicDbListPage = (params) => {
  params.head.transCode = 'queryBizSixteenTopicDbListPage';
  return request({
    url: '/biz/sixteen/bizSixteenTopicDb/queryBizSixteenTopicDbListPage',
    method: 'post',
    data: params
  })
}
//新增单条记录
export const saveBizSixteenTopicDb = (params) => {
  params.head.transCode = 'saveBizSixteenTopicDb';
  return request({
    url: '/biz/sixteen/bizSixteenTopicDb/saveBizSixteenTopicDb',
    method: 'post',
    data: params
  })
}
//新增多条记录
export const saveBizSixteenTopicDbList = (params) => {
  params.head.transCode = 'saveBizSixteenTopicDbList';
  return request({
    url: '/biz/sixteen/bizSixteenTopicDb/saveBizSixteenTopicDbList',
    method: 'post',
    data: params
  })
}
//新增或修改单条记录
export const saveOrUpdateBizSixteenTopicDb = (params) => {
  params.head.transCode = 'saveOrUpdateBizSixteenTopicDb';
  return request({
    url: '/biz/sixteen/bizSixteenTopicDb/saveOrUpdateBizSixteenTopicDb',
    method: 'post',
    data: params
  })
}


//新增或修改单条记录
export const saveOrUpdateBizSixteenTopicDbList = (params) => {
  params.head.transCode = 'saveOrUpdateBizSixteenTopicDbList';
  return request({
    url: '/biz/sixteen/bizSixteenTopicDb/saveOrUpdateBizSixteenTopicDbList',
    method: 'post',
    data: params
  })
}

//修改单条记录
export const updateBizSixteenTopicDb = (params) => {
  params.head.transCode = 'updateBizSixteenTopicDb';
  return request({
    url: '/biz/sixteen/bizSixteenTopicDb/updateBizSixteenTopicDb',
    method: 'post',
    data: params
  })
}

//删除单条记录
export const deleteBizSixteenTopicDb = (params) => {
  params.head.transCode = 'deleteBizSixteenTopicDb';
  return request({
    url: '/biz/sixteen/bizSixteenTopicDb/deleteBizSixteenTopicDb',
    method: 'post',
    data: params
  })
}

//删除多条记录
export const deleteBizSixteenTopicDbList = (params) => {
  params.head.transCode = 'deleteBizSixteenTopicDbList';
  return request({
    url: '/biz/sixteen/bizSixteenTopicDb/deleteBizSixteenTopicDbList',
    method: 'post',
    data: params
  })
}
//导出excel
export const exportBizSixteenTopicDbExcel = (params) => {
  downloadExcel({
    url: '/biz/sixteen/bizSixteenTopicDb/excelDownload/exportBizSixteenTopicDbExcel',
    method: 'get',
    data: 
    {
      tenantId: params.head.tenantId,
      orders:'',
      condition: formatCondition(params.body.sqlCondition)
    }
  })
}
